package com.myex.demo.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.myex.demo.dao.TestMybatisPlushDao;
import com.myex.demo.model.OrderRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class TestPageService {


    @Autowired
    TestMybatisPlushDao testMybatisPlushDao;


    public IPage<OrderRecord> listOrder(Integer current, Integer size) {
        Page<OrderRecord> pageInfo = new Page<>(current, size);
        IPage<OrderRecord> page = testMybatisPlushDao.selectPage(pageInfo,new QueryWrapper<>());
        return page;
    }
}
